define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
    var zz=window.menghan;
	var Model = function(){
		this.callParent();
	};

	/*Model.prototype.row4Click = function(event){
         justep.Shell.showPage("login");
	};

	Model.prototype.row6Click = function(event){
	   
        justep.Shell.showPage("register");
	};
*/
	Model.prototype.modelModelConstruct = function(event){
      $('.name').html(window.name);
      if(window.menghan == 2){
      $('.wxm').css("border-right","0px solid #2fa4e7");
      $('.wxh').css("border-right","2px solid #2fa4e7");  
      $('.wmxc').css("display","none");
      $('.whxc').css("display","block");
 
      }
	};
	Model.prototype.row4Click = function(event){
	   zz=1;
      $('.wxm').css("border-right","2px solid #2fa4e7");
      $('.wxh').css("border-right","0px solid #2fa4e7"); 

      $('.wmxc').css("display","block");
      $('.whxc').css("display","none");
   
	};
	Model.prototype.row5Click = function(event){
	 zz=2;
	  $('.wxm').css("border-right","0px solid #2fa4e7");
      $('.wxh').css("border-right","2px solid #2fa4e7"); 
     
      $('.wmxc').css("display","none");
      $('.whxc').css("display","block");
  
	};

	Model.prototype.li1Click = function(event){
	  
     var row=event.bindingContext.$object;
       this.comp("wdEmptym").open({
        params:{
              rowdata:row.toJson()
        }     
       });
	};
	Model.prototype.li2Click = function(event){
       var row=event.bindingContext.$object;
       this.comp("wdEmptyh").open({
        params:{
              rowdata:row.toJson()
        }     
       });
	};
	Model.prototype.button1Click = function(event){
       if(zz==1){
          justep.Shell.showPage("editwenzhang");
       }else{
         justep.Shell.showPage("editwenzhang");
       }
	};
	return Model;
});